package com.example.todolist.tools;


import java.text.ParseException;
import java.text.SimpleDateFormat;

public class StringToDateConverter {
    public java.sql.Date StringToDate(String Date)
    {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        java.util.Date date;
        try {
            date = format.parse(Date);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
        return new java.sql.Date(date.getTime());
    }
}
